class GalleryBooksPageController < ApplicationController
  def gallery_books_page
    @books = TbBookinfo.all
    @book_info =[]
    if @books != nil
      @books.each do |book|
        booktype = {}
        booktype[:book_type] = TbBooktype.find(book.typeid)
        booktype[:book_publish] = TbPublish.find_by_ISBN(book.ISBN)
        booktype[:book_info] = book
        @book_info.push(booktype)
      end
      end
  end
  def gallery_pblish
    @pblishs = TbPublish.all
  end
  def gallery_book_type
    @book_types = TbBooktype.all
  end
end
